![]() |
NavCreatePreview |
||||
Header: | Navigation.h | Carbon status: | Supported | |
Creates a document preview in a specified file. (Navigation Services 2.0 or later.)
OSErr NavCreatePreview ( AEDesc *theObject, OSType previewDataType, const void *previewData, Size previewDataSize );
A pointer to an Apple Event Descriptor (AEDesc) structure specifying the file in which to create the preview.
A four character code specifying the type of preview data to create. If you pass NULL in this parameter, Navigation Services creates a preview of type 'PICT'.
A pointer to a buffer holding preview data. If you pass NULL in this parameter, Navigation Services provides its own data.
A value specifying the size, in bytes, of the preview data you are providing. If you pass NULL in this parameter, Navigation Services provides its own data.
A result code.
(Navigation Services 2.0 or later.) This function creates a preview of the specified file and stores the data in an appropriate resource. If you call this function without passing in preview data, as in the following snippet, Navigation Services obtains and creates the preview automatically:
NavCreatePreview(theObject,0,NULL,0)
If the specified file is image-based ('PICT', 'JPEG', etc.), Navigation Services creates a thumbnail custom icon for the file. Navigation Services does not create a custom icon if you pass in your own preview data.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 9, or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)